<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : Province_Customer.xsl
    Created on : July 22, 2013, 3:30 PM
    Author     : TOSHIBA
    Description:
        Purpose of transformation follows.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html" omit-xml-declaration="yes"/>
    <xsl:param name="check"/>

    <xsl:template match="/">
        <header class="sixteen columns">
            <div id="logo">
                <h1>Bui travel</h1>
            </div>
            <hr />
        </header>
        <div class="container">
            <div id="work">
                <div id="overview" class="sixteen columns">
                    <h3>Where do you want to go?</h3>
                    <hr />
                </div>
                <xsl:apply-templates select="provinces"/>
            </div>
        </div>
    </xsl:template>
    <xsl:template match="provinces">
        <xsl:apply-templates select="province"/>
    </xsl:template>
    <xsl:template match="province">
        <xsl:if test="(position() mod 2) = 0">
            <div class="eight columns" id="col2">
                <div class="project">
                    <a href="PlaceList.jsp?province={id}">
                        <img src="images/{province_picture}" class="thumbnailImage"/>
                    </a>
                    <div class="projectInfo">
                        <h4>
                            <xsl:value-of select="name"/>
                        </h4>
                    </div>
                </div>
                <xsl:if test="$check = 1">
                    <a href="ProvinceController?btAction=DeleteProvince&amp;Province_ID={id}" onclick="return confirm('Are you sure want to delete???')">Delete</a>
                    <a href="ProvinceController?btAction=EditProvince&amp;Province_ID={id}">Edit</a>
                </xsl:if>
            </div>
        </xsl:if>
        <xsl:if test="(position() mod 2) = 1">
            <div class="eight columns" id="col1">
                <div class="project">
                    <a href="PlaceList.jsp?province={id}">
                        <img src="images/{province_picture}" class="thumbnailImage"/>
                    </a>
                    <div class="projectInfo">
                        <h4>
                            <xsl:value-of select="name"/>
                        </h4>
                    </div>
                </div>
                <xsl:if test="$check = 1">
                    <a href="ProvinceController?btAction=DeleteProvince&amp;Province_ID={id}" onclick="return confirm('Are you sure want to delete???')">Delete</a>
                    <a href="ProvinceController?btAction=EditProvince&amp;Province_ID={id}">Edit</a>
                </xsl:if>
            </div>
        </xsl:if>
    </xsl:template>
</xsl:stylesheet>
